package com.lemon.smartsafety.ui.fragment.fire;

import android.support.v4.widget.SwipeRefreshLayout;
import android.view.View;
import android.widget.AdapterView;

import com.lemon.smartsafety.R;
import com.lemon.smartsafety.mode.adapter.LampMode;
import com.lemon.smartsafetynew.ui.activity.base.NewBaseFragment;
import com.lemon.smartsafety.ui.adapter.fire.LampAdapter;
import com.lemon.smartsafety.utils.app.ToastUtils;
import com.lemon.smartsafety.view.list.ListRefreshView;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;


/**
 * 项目名称：workspace
 * 类描述：
 * 创建人：Fargo
 * 创建时间：2016/8/9 11:33
 * 修改人：Fargo
 * 修改时间：2016/8/9 11:33
 * 修改备注：   项目达标率TAB页   通用的
 */
public class FirefightingCommFragment extends NewBaseFragment {


    @Bind(R.id.listView)
    ListRefreshView listView;
    @Bind(R.id.swipe_layout)
    SwipeRefreshLayout swipeLayout;


    private LampAdapter lampAdapter;
    private List<LampMode> mList;
    private LampMode lampMode;


    @Override
    protected void getBundleArgs() {
        if(getArguments().containsKey("tab")){
            ToastUtils.toastMsg(getArguments().getString("tab"));
        }

    }

    @Override
    protected int getContentViewId() {
        return R.layout.fragment_firefighting_statistics;
    }

    @Override
    protected void initView() {


        mList = new ArrayList<>();
        mList.add(new LampMode(0, "平面布局", "7/10", true, R.drawable.shape_circle_red));
        mList.add(new LampMode(0, "灭火救援设施", "30/40", true, R.drawable.shape_circle_yellow));
        mList.add(new LampMode(0, "防火防烟分区和分隔", "7/10", true, R.drawable.shape_circle_red));
        mList.add(new LampMode(0, "安全疏散", "30/40", true, R.drawable.shape_circle_yellow));
        mList.add(new LampMode(0, "办公楼", "7/10", true, R.drawable.shape_circle_red));
        mList.add(new LampMode(0, "铸造车间", "30/40", true, R.drawable.shape_circle_yellow));
        lampAdapter = new LampAdapter(mActivity, mList);
        lampAdapter.setShowArrowRight(false);
        listView.setAdapter(lampAdapter);
        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                switch (position) {

                }

            }
        });

        initSwipRefresh(swipeLayout);
        initLoadeRefresh(listView);
    }

    @Override
    protected void initHttp() {
        bPutHttp = true;
    }

    @Override
    protected void initList() {
        current_page = 1;
    }

    @Override
    protected void loadList() {

    }

    @Override
    protected void refreshView() {

    }

    @Override
    protected void callFinish() {

    }


}
